-
-
Notifications
You must be signed in to change notification settings - Fork 10
Adds RFC proposal for caching generated assembly #2
Conversation
## Unresolved questions | ||
[unresolved-questions]: #unresolved-questions | ||
|
||
Don't think there are any. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caching compilation is not alone enough. We must also cache registered tools resolved via #tool
directive. Addins (and their dependencies) must also be loaded into app domain / load context in same order as the first time when resolved via #addin
directive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything still runs the same as previously. The script itself is still processed by cake to pickup the #addin's and #tool's. Once this is done and the complete script is generated this is where cake would compile the script to run. At this point it checks to see if a valid cached compile scripted exists. If it does then it runs the cached script.
|
||
Two new arguments will be added to the Cake Client. | ||
|
||
* Cache - If set true the compiled script will be cached |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could (should) be true by default. Maybe there can be an additional check to check modification time of files against the build time of the cached assembly to determine whether a new build is required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They wanted this to be opt-in so that is why it was defaulted to false. There is an additional step to determine if the cached assembly is valid. A hash is taken of the final script and that is used to determine if the cache is valid or not.
The RFC process is no longer being followed by the Cake project. This feature was added to Cake in this PR: cake-build/cake#2099 As such, I am going to go ahead and close this PR. |
No description provided.